package com.wcar.store.controller;

import com.wcar.common.entity.FrontUser;
import com.wcar.common.entity.FrontUserStore;
import com.wcar.common.vo.Result;
import com.wcar.store.service.FrontUserService;
import com.wcar.store.vo.FrontUserStoreVO;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @BelongsProject: four-wcar-idea
 * @BelongsPackage: com.wcar.store.controller
 * @Author: 李睢康
 * @CreateTime: 2024-06-03  14:41
 */
@RestController
@RequestMapping("/store/frontuser")
public class FrontUserController {
    @Resource
    private FrontUserService frontUserService;
    @RequestMapping("/api/selectFrontUser")
    public Result<FrontUserStore> findFrontUser(Integer storeId, Integer userId){
        return frontUserService.findFrontUser(storeId,userId);
    }
    @PostMapping("/api/insertFrontUser")
    public Result<Integer> insert(@RequestBody FrontUserStoreVO frontUserStoreVO){
        return frontUserService.insert(frontUserStoreVO);
    }
}
